import request from '@/utils/request'
import { getApiUrl } from '@/utils/request'

export function listequipmentInv(query) {
  return request({
    url: '/equipment/equipmentInv/list',
    method: 'get',
    params: query
  })
}

export function createequipmentInv(data) {
  return request({
    url: '/equipment/equipmentInv/create',
    method: 'post',
    data
  })
}

export function readequipmentInv(data) {
  return request({
    url: '/equipment/equipmentInv/get/' + data.id,
    method: 'get'
  })
}

export function updateequipmentInv(data) {
  return request({
    url: '/equipment/equipmentInv/update',
    method: 'post',
    data
  })
}

export function deleteequipmentInv(data) {
  return request({
    url: '/equipment/equipmentInv/delete/' + data.fequipmentbarcode,
    method: 'delete'
  })
}

const uploadPath = getApiUrl() + 'equipment/equipmentInv/upload'
export { uploadPath }
